import React, { Component } from 'react';
import { Swiper } from 'antd-mobile'
import '../../styles/carousel.scss'

class carousel extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }

  render() {
    return (
      
      <Swiper autoplay loop>
        {
          this.props.data &&
          this.props.data.map((item,index) => {
            return (
              <Swiper.Item key={index}>
                <img src={item.pic} alt="" />
              </Swiper.Item>
            )
          })
        }
    </Swiper>
    );
  }
}

carousel.propTypes = {

};

export default carousel;

/* {



const bannerList =this.props.data

const Carousel = () => {
  
  return (
    <>
      
    </>

  )
}
export default Carousel } */